Blazor - Webassembly Project how to set up Dataadapter
Blazor - Webassembly Project how to set up Dataadapter
Hello Simulsoft team,
We are moving stimulsoft from old WFP to new Blazor WASM project. In our old WFP, we have set up custom datasource for that WPF client can send sql query to our api server for querying data (this proxy has been set up due to firewall configuration which disallow client to access directly the database).
Same case for the Blazor WASM, the client will not be allowed to access directly the database server. I've found this https://github.com/stimulsoft/Samples-J ... 0databases interesting link which allows JS reporter to communicate with the server by passing the command sql. So I am wondering how should we do it with Blazor WSAM. Appreciate if the team could help sharing some sample code or give some guidance.
Best
We are moving stimulsoft from old WFP to new Blazor WASM project. In our old WFP, we have set up custom datasource for that WPF client can send sql query to our api server for querying data (this proxy has been set up due to firewall configuration which disallow client to access directly the database).
Same case for the Blazor WASM, the client will not be allowed to access directly the database server. I've found this https://github.com/stimulsoft/Samples-J ... 0databases interesting link which allows JS reporter to communicate with the server by passing the command sql. So I am wondering how should we do it with Blazor WSAM. Appreciate if the team could help sharing some sample code or give some guidance.
Best
-
- Posts: 6365
- Joined: Tue Mar 20, 2018 5:34 am
Re: Blazor - Webassembly Project how to set up Dataadapter
Hello,
Please check the following samples:
https://github.com/stimulsoft/Samples-Blazor-Server
https://github.com/stimulsoft/Samples-B ... ebAssembly
Thank you.
Please check the following samples:
https://github.com/stimulsoft/Samples-Blazor-Server
https://github.com/stimulsoft/Samples-B ... ebAssembly
Thank you.
Re: Blazor - Webassembly Project how to set up Dataadapter
Hi Lech,
Thank you for the replay, actually I've consulted these two repos but not able to find the example for integrating custom database and adapter by extending
- StiSqlDatabase
- StiSqlAdapterService
Could you help providing sample code for the blazor if possible.
Actually, we've created our custom datasource based on these two classes in our WPF project.
Thank you
Thank you for the replay, actually I've consulted these two repos but not able to find the example for integrating custom database and adapter by extending
- StiSqlDatabase
- StiSqlAdapterService
Could you help providing sample code for the blazor if possible.
Actually, we've created our custom datasource based on these two classes in our WPF project.
Thank you
-
- Posts: 6365
- Joined: Tue Mar 20, 2018 5:34 am
Re: Blazor - Webassembly Project how to set up Dataadapter
Hello,
We need some additional time to investigate the issue, we will let you know about the result.
Thank you.
#3920
We need some additional time to investigate the issue, we will let you know about the result.
Thank you.
#3920
Re: Blazor - Webassembly Project how to set up Dataadapter
Hi lech,
Thanks a lot for the info provided, could you please keep me updated for that we can make the decision ASAP.
Best
Thanks a lot for the info provided, could you please keep me updated for that we can make the decision ASAP.
Best
-
- Posts: 6365
- Joined: Tue Mar 20, 2018 5:34 am
-
- Posts: 6365
- Joined: Tue Mar 20, 2018 5:34 am
Re: Blazor - Webassembly Project how to set up Dataadapter
Hello,
Please check the following code:
Thank you.
Please check the following code:
Code: Select all
protected override Task OnInitializedAsync()
{
var report1 = new StiReport();
report1.Load(@"UserData.mrt");
var stiUserData1 = new Stimulsoft.Report.Dictionary.StiUserData();
stiUserData1.Columns.AddRange(new Stimulsoft.Report.Dictionary.StiDataColumn[] {
new Stimulsoft.Report.Dictionary.StiDataColumn("Name", "Name", "Name", typeof(string), null),
new Stimulsoft.Report.Dictionary.StiDataColumn("Value", "Value", "Value", typeof(string), null)});
stiUserData1.Count = 5;
stiUserData1.GetData += new Stimulsoft.Report.Dictionary.StiUserGetDataEventHandler(stiUserData1_GetData);
Report1.RegData("UserData", stiUserData1);
return base.OnInitializedAsync();
}
private string[] nameArray= new string[] { "Mahesh Chand", "Mike Gold", "Raj Beniwal", "Praveen Kumar", "Dinesh Beniwal" };
private string[] valueArray = new string[] { "00", "01", "02", "03", "04" };
private void stiUserData1_GetData(object sender, Stimulsoft.Report.Dictionary.StiUserGetDataEventArgs e)
{
if (e.ColumnName == "Name") e.Data = nameArray[e.Position];
if (e.ColumnName == "Value") e.Data = valueArray[e.Position];
}
- Attachments
-
- UserData.mrt.txt
- (9.5 KiB) Downloaded 127 times
Re: Blazor - Webassembly Project how to set up Dataadapter
Hi lech,
It looks great, let me have a test.
Thank you for the info
It looks great, let me have a test.
Thank you for the info
-
- Posts: 6365
- Joined: Tue Mar 20, 2018 5:34 am
Re: Blazor - Webassembly Project how to set up Dataadapter
Hello,
You are welcome!
You are welcome!
Re: Blazor - Webassembly Project how to set up Dataadapter
hi lech,
May I ask the plan of blazor documentation guide developer. As right now cannot really find it from the documentations site. I think a complete doc or examples which covers all necessary features could make the usage of this solution easier.
May I ask the plan of blazor documentation guide developer. As right now cannot really find it from the documentations site. I think a complete doc or examples which covers all necessary features could make the usage of this solution easier.