Newbie Question
Newbie Question
This may be a dumb question but I'm stumped. I just installed the demo last night and have started playing around with it today. I've created a simple form with 4 textboxes. The textboxes are populated when their row is selected from a DataRepeater control (Master/Detail scenario. I'm using Visual Basic Express 2008). All I want to do is create a report that pulls the text from those text boxes and displays in a report for printing. I can't seem to figure out how to tell the report to only generate a report based upon a specific record ID.
I think this program will work for my situation. My application is a very basic services company data entry application. I only have two tables in an Access database, Clients & Visits. When a technician visits a client, they open their laptop, enter some notes into the four boxes, save the record/visit, then I want to generate a report, then print a report.
I think this program will work for my situation. My application is a very basic services company data entry application. I only have two tables in an Access database, Clients & Visits. When a technician visits a client, they open their laptop, enter some notes into the four boxes, save the record/visit, then I want to generate a report, then print a report.
Newbie Question
Hello.
In that report parameters for queries have been set from the dialog form. As far as I understand you have the 'recordID' parameter. You can pass that parameter to the report without using a Dialog form:
Named parameters:
http://www.stimulsoft.com/livedemos/Rep ... eters.html
Unnamed parameters:
http://www.stimulsoft.com/livedemos/Rep ... ers_2.html
If you still face any problems with working with parameters, please send the sample you are working on to support[at]stimulsoft.com and we will help you.
Thank you.
You need to create a SQL master-detail report with parameters. Please open 'Demo' sample application from the standard installation of Stimulsoft Reports.Net. Then in 'SQL' group of reports please run 'Parameters from Dialog Form' report. You also can open it in Designer.xfratboy wrote:This may be a dumb question but I'm stumped. I just installed the demo last night and have started playing around with it today. I've created a simple form with 4 textboxes. The textboxes are populated when their row is selected from a DataRepeater control (Master/Detail scenario. I'm using Visual Basic Express 2008). All I want to do is create a report that pulls the text from those text boxes and displays in a report for printing. I can't seem to figure out how to tell the report to only generate a report based upon a specific record ID.
In that report parameters for queries have been set from the dialog form. As far as I understand you have the 'recordID' parameter. You can pass that parameter to the report without using a Dialog form:
Code: Select all
Dim Report As New StiReport
Report.Load("SQLSimpleQuery.mrt")
Dim connectionString As String = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=|DataDirectory|\NWIND.MDB"
Dim myConnection As New OleDbConnection(connectionString)
report.RegData("NorthWind", myConnection)
report.DataSources.Item("Employees").Parameters.Add(New StiDataParameter("@MyParameter", 8, 10))
report.Compile
report.CompiledReport.DataSources.Item("Employees").Parameters.Item("@parameter").ParameterValue = 2
report.Show
How to use parameters in SQL queries you can also see here:I think this program will work for my situation. My application is a very basic services company data entry application. I only have two tables in an Access database, Clients & Visits. When a technician visits a client, they open their laptop, enter some notes into the four boxes, save the record/visit, then I want to generate a report, then print a report.
Named parameters:
http://www.stimulsoft.com/livedemos/Rep ... eters.html
Unnamed parameters:
http://www.stimulsoft.com/livedemos/Rep ... ers_2.html
If you still face any problems with working with parameters, please send the sample you are working on to support[at]stimulsoft.com and we will help you.
Thank you.
Newbie Question
I'm a caveman and these things are too complex for my primitive brain. I should probably send you my sample. ..but I'm just wondering. Is there not just a primitive way to take the .text value from winform's textbox and put that into a report?


Newbie Question
If you want to pass data from your application to a report without having to query a database it can be done very easily.
Firstly, define the variables in the Report that will hold the data you want to pass it.
So in your example, if you go to the dictionary in the Report and add 2 new variables [myTextBlock1, myTextBlock2] as type string.
Now on the Page of your report you can drag those two variables onto the page and size them however you wish. Save the report to whatever location you are working from [e.g c:\myApp\Reports\myReport.mrt]
Now in your application code you can do the following:
Firstly, define the variables in the Report that will hold the data you want to pass it.
So in your example, if you go to the dictionary in the Report and add 2 new variables [myTextBlock1, myTextBlock2] as type string.
Now on the Page of your report you can drag those two variables onto the page and size them however you wish. Save the report to whatever location you are working from [e.g c:\myApp\Reports\myReport.mrt]
Now in your application code you can do the following:
Code: Select all
Stimulsoft.Report.StiReport report = new Stimulsoft.Report.StiReport();
report.Load(@"c:\myApp\Reports\myReport.mrt");
report.Comile(); //Compile the report so we can access its variables
report["myTextBlock1"] = AYTRichTextBox1.Text;
report["myTextBlock2"] = AYTRichTextBox2.Text;
Report.Show();
Newbie Question
That will work. Only problem now, is how do I get the string data to carry over to multiple pages? I've played with settings like Can Break, Can Grow, but it only grows to the length of one page (and grows to the complete length of the page). I know I'm just so new at this that I don't understand the hierarchy of everything.


Newbie Question
Hi you can try the following:

If you place 2 databands on the report page and set their CountData to 1 (either via properties or Double Click the Databand and set the Count Data to 1 near the bottom)
You can add a Header Band to each Databand also to add a header if necessary. Place each Text variable into each Databand.
Not set the following properties for the Databand components:
For the Text Variable components set the following properties:

If you place 2 databands on the report page and set their CountData to 1 (either via properties or Double Click the Databand and set the Count Data to 1 near the bottom)
You can add a Header Band to each Databand also to add a header if necessary. Place each Text variable into each Databand.
Not set the following properties for the Databand components:
Code: Select all
CanGrow = True
CanBreak = True
For the Text Variable components set the following properties:
Code: Select all
CanGrow = True
CanBreak = True
WordWrap = True