El Bruto - Juego de Navegador
Hoy me han metido en un juego por por navegador que me ha enganchado al instante! Se trata de un juego llamado EL BRUTO…sí sí, lo se, el nombre no es muy glamuroso pero de verdad que me ha enganchado!
El juego consiste en crear un personaje, un bruto, e irlo haciendo enfrentarse contra otros brutos de otra gente para que coga experiencia y así aumentar de nivel y poder adquirir nuevas armas y habilidades nuevas. Hasta donde yo he llegado (es mi primer día), tanto las armas como las habilidades se adquieren de manera aleatoria, pero no estoy muy seguro de ello. A medida que juegue más iré editando para que estéis enterados
.
Los enfrentamientos no son controlados, pero la animación que aparece (varía en cada combate, según tus habilidades y las del rival) son muy graciosas y muy divertidas!
El único contra que tiene es que sólo puedes hacer 3 combates diarios, aunque también hay torneos en los cuales también puedes luchar (independientemente de los combates que te resten ese día).
Pues nada más, si os ha picado la curiosidad de jugar y probarlo, aquí tenéis el link a la página. Sólo tenéis que escoger un nick (RECOMENDACIÓN: escoged un nick MUY raro, porque he probado muchos y todos estaban cogidos), diseñar vuestro bruto y a luchar!
Link: El Bruto
Interupt by Tabernasueca
Crystal Report: Setting values to subreport parameters using C#
Report Part
We create a report and then we press to the New Subreport button ( or
). Then, on the new window, we write the name of the subreport and we click on Ok button.
After calling the subrepot we click on Report Wizard button. We follow all the steps (or press on the Finish butten when you can) and we place the subreport on the nursemaid report.
Done that, we take a double click on the subreport to get in it. Being in, we create the parameters we want (as we explain in this post). In the example, only one:
Created all the parameters, we close the subreport and save the nursemaid report. We’ve finished this step.
Code Part
In this part, we’re going to need these assemblies in our project:
using CrystalDecisions.CrystalReports.Engine;
using CrystalDecisions.Web;
To proceed we are going to create a crystal report “in code”:
ReportDocument rptDoc = new ReportDocument();
rptDoc.Load(pathReport);
After that we should “connect” the report to the data base:
ConnectionInfo cInfo = new ConnectionInfo();
cInfo.UserID = "user";
cInfo.Password = "passwor";
cInfo.ServerName = "datasource";
ConectaReport(cInfo, rptDoc);
And now, we assign the subparameter name and value:
rptDoc.SetParameterValue("paramOne", "this is the subparam value", "subReport");
That’s all!
Crystal Reports: Setting values to report parameters using C#
Report Part
The first step consist in create a new report. To do it we’re gona click on File -> New -> Blank Report.
We click on Parameter Fields with the right mouse button and then in New:
A new window will appear with Create New Parameter as a title. Here we’re going to define the parameter options. In this tutorial we’re going to create two parameters, one as a string and one as a Boolean.
After creating our two parameters, Parameter Fields have to be similar as:
Code Part
In this part, we’re going to need these assemblies in our project:
using CrystalDecisions.Shared;
using CrystalDecisions.CrystalReports.Engine;
using CrystalDecisions.Web;
Also we need, in the front-end, a crystal report viewer similar to:
<CR:CrystalReportViewer ID="rptViewer" runat="server" AutoDataBind="true" Width="796px" PageZoomFactor="90" BestFitPage="True" HasCrystalLogo="True" HasDrilldownTabs="False" ToolPanelView="None" style="text-align:center" HasZoomFactorList="False" HasDrillUpButton="False" HasToggleGroupTreeButton="false" HasToggleParameterPanelButton="False" />
To proceed we are going to create a crystal report “in code”:
string rutaReport = "../reports/reportExample.rp";
ReportDocument rptDoc = new ReportDocument();
rptDoc.Load(rutaReport);
After that we should “connect” the report to the data base:
ConnectionInfo cInfo = new ConnectionInfo();
cInfo.UserID = "user";
cInfo.Password = "passwor";
cInfo.ServerName = "datasource";
ConectaReport(cInfo, rptDoc);
Now, let’s go to the parameter values. We have to create a parameter vector:
ParameterFields myParams = new ParameterFields();
And now we will put all the parameters (ParameterField) with their values (ParameterDiscreteValue) in it:
ParameterField myParam = new ParameterField();
ParameterDiscreteValue myDiscreteValue = new ParameterDiscreteValue();
myParam.ParameterFieldName = "paramOne";
myDiscreteValue.Value = "Value of the paramOne";
myParams.Add(myParam);
myParam = new ParameterField();
myDiscreteValue = new ParameterDiscreteValue();
myParam.ParameterFieldName = "paramTwo";
myDiscreteValue.Value = true;
myParams.Add(myParam);
And that’s all.


