ReportView Help Please

Started by mcvpjd3, July 23, 2013, 02:55:18 AM

Previous topic - Next topic


Hi folks, Iââ,¬â,,¢m asking for some help here with a ReportView Dynamic Dialog. For some reason the ReportView stuff will just now work in my head so Iââ,¬â,,¢m coming cap in hand asking for some big pointers with this one.

Basically I need a dialog that will do the following:

On a selected users PC, in a folder (lets say C:\data) there can be 0 to 50 files available. There is also a CSV that lists all 50 possible files with some other information. The CSV can look like:

Filename                           DB Internalname     DB Friendlyname             Install Source
C:\Data\databse1.db1            DNCHDJHS             Summary of Data             \\network\Data\databse1.exe
C:\Data\databse2.db1            DHGNDFJH             Selection 1 Data               \\network\Data\ databse2.exe
C:\Data\another.db2              DNVHFBVN             Some Other Name            \\network\Data\ another.exe

I need a Dialog that will use the CSV, look into the C:\Data directory and put a check in the checkbox for each of the records where the file exists. The user will then check other boxes and an application runs to install the new database or unckeck and an uninstall happens.

Any pointers/help would be appreciated.



Thanks stanl, I've started looking at this and I'm using the code from the example you gave, it's starting to make sense. However, I've got another question.

Using the source code above and if I have a CSV file that looked like this but with a lot more lines...

Data1          Data2  Location           OtherInfo       Type
Database1    1423   Here                Other             A
Database2    23       there               Different        A
Database3    2334   Everywhere      Something      B
Database4    234     Nowehere        Stuff                 B
Database5    434     Where             What              A

I want to be able to let the user choose between showing Type A or B. I was thinking of putting a checkbox beside the ReportView control, but how do I change the Reportview to only show Type A if the user selects the "A" checkbox.

Something like the attached image.



I recommend reading through the DialogControlGet/Set documentation in the Help file.   I believe you will want request code 5 but by reading through all the request-code options you will have a better idea of what you can do.   Also recommend the DialogProcOptions and DialogControlState as well.

Specifically you will need your "Types" separated into different arrays or files or you could loop through and remove the undesirable ones after writing all of them to the control.  I would lean toward the former solution.